<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <head th:include="include :: header"></head>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="col-sm-12">
        <div class="ibox">
            <div class="ibox-body">
                <div class="fixed-table-toolbar">
                    <div class="columns pull-left" style="width: 70%;">
                        <div class="columns pull-right col-md-6 nopadding">
                            <input id="dateTime" type="text" class="form-control"
                                   placeholder="订单开始和结束日期">
                            <input id="startTime" type="hidden" name="startTime">
                            <input id="endTime" type="hidden" name="endTime">
                        </div>
                        <input type="hidden" id="roleId" th:value="${roleId}">
                        <div class="columns pull-right col-md-3 nopadding">
                            <select data-placeholder="选择收款户" id="payeeId" name="payeeId"
                                    class="form-control chosen-select"
                                    tabindex="2" style="width: 100%">
                            </select>
                        </div>
                        <div class="columns pull-right col-md-3 nopadding">
                            <select data-placeholder="选择收款户代理" id="payeeAgentId" name="payeeAgentId"
                                    class="form-control chosen-select"
                                    tabindex="2" style="width: 100%">
                                <option value="">请选择收款户代理</option>
                            </select>
                        </div>
                        <div class="columns pull-right col-md-3 nopadding">
                            <select data-placeholder="选择商户" id="merchantId" name="merchantId"
                                    class="form-control chosen-select"
                                    tabindex="2" style="width: 100%">
                            </select>
                        </div>
                        <div class="columns pull-right col-md-3 nopadding">
                            <select data-placeholder="选择商户代理" id="merchantAgentId" name="merchantAgentId"
                                    class="form-control chosen-select"
                                    tabindex="2" style="width: 100%">
                                <option value="">请选择商户代理</option>
                            </select>
                        </div>
                        <div class="columns pull-right col-md-3 nopadding">
                            <select data-placeholder="选择支付渠道" id="payType" name="payType"
                                    class="form-control chosen-select"
                                    tabindex="2" style="width: 100%">
                                <option value="">请选择支付渠道</option>
                                <option value="1">支付宝固码</option>
                                <option value="2">微信固码</option>
                                <option value="3">支付宝H5跳转</option>
                                <option value="4">支付宝账号(吱口令)</option>
                            </select>
                        </div>
                    </div>
                    <div class="columns pull-right">
                        <button class="btn btn-success" onclick="reLoad()">查询</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <form class="form-horizontal m-t" id="signupForm">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>订单统计</h5>
                    </div>
                    <div class="ibox-content">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">总订单数（包括失效单）：</label>
                            <div class="col-sm-8">
                                <text id="count"></text>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">总成功订单数：</label>
                            <div class="col-sm-8">
                                <text id="countOk"></text>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">总成功率(单位%)：</label>
                            <div class="col-sm-8">
                                <text id="countOkCharge"></text>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">成功订单总额：</label>
                            <div class="col-sm-8">
                                <text id="countMoney"></text>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">今日总订单数（包括失效单）：</label>
                            <div class="col-sm-8">
                                <text id="todayCount"></text>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">今日总成功订单数：</label>
                            <div class="col-sm-8">
                                <text id="todayCountOk"></text>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">今日成功率(单位%)：</label>
                            <div class="col-sm-8">
                                <text id="todayOkCharge"></text>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">今日成功订单总额：</label>
                            <div class="col-sm-8">
                                <text id="todayCountMoney"></text>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>通道统计</h5>
                    </div>
                    <div class="ibox-content">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">今日支付宝固码订单量：</label>
                            <div class="col-sm-8">
                                <text id="todayAliCode"></text>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">今日微信固码订单量：</label>
                            <div class="col-sm-8">
                                <text id="todayWeixinCode"></text>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">今日支付宝H5跳转订单量：</label>
                            <div class="col-sm-8">
                                <text id="todayAlipay"></text>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">今日支付宝账号(吱口令)订单量：</label>
                            <div class="col-sm-8">
                                <text id="todayAlipayAccount"></text>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">支付宝固码总订单量：</label>
                            <div class="col-sm-8">
                                <text id="aliCode"></text>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">微信固码总订单量：</label>
                            <div class="col-sm-8">
                                <text id="weixinCode"></text>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">支付宝H5跳转总订单量：</label>
                            <div class="col-sm-8">
                                <text id="alipay"></text>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">支付宝账号(吱口令)总订单量：</label>
                            <div class="col-sm-8">
                                <text id="alipayAccount"></text>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-sm-12" th:if="${roleId} == 1 or ${roleId} == 64">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>平台利润统计</h5>
                    </div>
                    <div class="ibox-content">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">平台总利润：</label>
                            <div class="col-sm-8">
                                <text id="platMoney"></text>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">今日平台利润：</label>
                            <div class="col-sm-8">
                                <text id="todayPlatMoney"></text>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-sm-12" th:if="${roleId} == 60 or ${roleId} == 1 or ${roleId} == 64">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>商户代理利润统计</h5>
                    </div>
                    <div class="ibox-content">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">商户代理总佣金：</label>
                            <div class="col-sm-8">
                                <text id="merAgentMoney"></text>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">商户代理可提现金额：</label>
                            <div class="col-sm-8">
                                <text id="merAgentRecordMoney"></text>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">今日商户代理佣金：</label>
                            <div class="col-sm-8">
                                <text id="todayMerAgentMoney"></text>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-sm-12" th:if="${roleId} == 60 or ${roleId} == 1 or ${roleId} == 64 or ${roleId} == 62">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>商户利润统计</h5>
                    </div>
                    <div class="ibox-content">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">商户总金额：</label>
                            <div class="col-sm-8">
                                <text id="merMoney"></text>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">今日商户金额：</label>
                            <div class="col-sm-8">
                                <text id="todayMerMoney"></text>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">商户可提现金额：</label>
                            <div class="col-sm-8">
                                <text id="merRecordMoney"></text>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-sm-12" th:if="${roleId} == 1 or ${roleId} == 64 or ${roleId} == 61">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>收款户代理利润统计</h5>
                    </div>
                    <div class="ibox-content">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">收款户代理总佣金：</label>
                            <div class="col-sm-8">
                                <text id="payeeAgentMoney"></text>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">收款户代理纯利润：</label>
                            <div class="col-sm-8">
                                <text id="payeeAgentMoneys"></text>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">今日收款户代理佣金：</label>
                            <div class="col-sm-8">
                                <text id="todayPayeeAgentMoney"></text>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">收款户代理总余额：</label>
                            <div class="col-sm-8">
                                <text id="payeeAgentBalance"></text>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">收款户代理已充值总额：</label>
                            <div class="col-sm-8">
                                <text id="payeeAgentRecharge"></text>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>
<div th:include="include :: footer"></div>
<script type="text/javascript" src="/js/lay/laydate/laydate.js"></script>
<script type="text/javascript" src="/js/appjs/orders/profit/list.js"></script>
</body>
</html>